<div class="grid_4">
	<div class="da-panel collapsible">
		<form id="form_list_permission"
			action="<?php echo ROOT_URL.$this->url(array('controller'=>'permission','action'=>'deletemulti','module'=>'admin'),null,true)?>"
			method="post">
			<div class="da-panel-header">
				<span class="da-panel-title"> <img
					src="images/icons/black/16/list.png" alt="" /> List permission <a
					style="float: right; margin-right: 10px"
					href="<?php echo ROOT_URL.$this->url(array('controller'=>'permission','action'=>'create','module'=>'admin'),null,true)?>"
					class="da-button green">Create new permission</a> <a
					id="delete_multi_permission"
					style="float: right; margin-right: 10px" href="#"
					class="da-button green">Delete seleted</a>
				</span>
			</div>
			<div class="da-panel-content">
				<table id="da-ex-datatable-numberpaging" class="da-table">
					<thead>
						<tr>
							<th></th>
							<th><b>Name</b></th>
							<th><b>Module</b></th>
							<th><b>Controller</b></th>
							<th><b>Action</b></th>
							<th><b>Order</b></th>
							<th><b>Options</b></th>
						</tr>
					</thead>
					<tbody>
						<?php if(count($this->Permissions)>0){?>
							<?php foreach ($this->Permissions as $key=>$Permission){?>
								<tr>
									<td><input type="checkbox" name="permission[]"
										value="<?php echo $Permission->id;?>" /></td>
									<td><?php echo $Permission->name;?></td>
									<td><?php echo $Permission->module;?></td>
									<td><?php echo $Permission->controller;?></td>
									<td><?php echo $Permission->action;?></td>
									<td><?php echo $Permission->orders;?></td>
									<td class="da-icon-column"><a
										href="<?php echo ROOT_URL.$this->url(array('controller'=>'permission','action'=>'edit','module'=>'admin','id'=>$Permission->id),null,true)?>"><img
											src="<?php echo TEMPLATE_URL?>/admin/images/icons/color/pencil.png" /></a>
										<a class='da-ex-dialog-form-permission'
										href="<?php echo ROOT_URL.$this->url(array('controller'=>'ajax','action'=>'getpermission','module'=>'admin','id'=>$Permission->id),null,true)?>"><img
											src="<?php echo TEMPLATE_URL?>/admin/images/icons/color/cross.png" /></a>
									</td>
								</tr>
							<?php }?>
						<?php }?>
					</tbody>
				</table>
			</div>
		</form>
	</div>
</div>
<div id="da-ex-dialog-form-div-permission" class="no-padding">
	<form id="da-ex-dialog-form-val-permission" class="da-form"
		action="<?php echo ROOT_URL.$this->url(array('controller'=>'permission','action'=>'delete','module'=>'admin'),null,true)?>"
		method="post">
		<div id="da-validate-error" class="da-message error"
			style="display: none;"></div>
		<div class="da-form-inline">
			<div class="da-form-row">
				<p>
					Are you want to delete permission "<span style="font-weight: bold" id="permission_name_label"></span>"
				</p>
				<input type="hidden" name="permission_id" value="" />
			</div>
		</div>
	</form>
</div>